<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;

class Product extends Model implements HasMedia
{
    use InteractsWithMedia;

    protected $fillable = [
        'name',
        'price',
        'stock',
        'sales_count',
        'is_saleable',
        'description'
    ];

    // Add this method
    // public function variants()
    // {
    //     return $this->hasMany(ProductVariant::class);
    // }

    // public function hasVariants()
    // {
    //     return $this->variants()->exists();
    // }
}